package org.iks.push.business.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.iks.common.AjaxResult;
import org.iks.push.business.service.PushService;
import org.iks.push.business.vo.OnlineUserVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Author kzou
 * Date 2024/2/12
 * Description:
 */
@Tag(name = "在线服务")
@RestController
@RequestMapping("/online")
public class OnlineController {
    @Autowired
    private PushService pushService;

    @PostMapping("/query/user")
    @Operation(summary = "获取在线好友")
    public AjaxResult<List<OnlineUserVo>> queryOnlineUser() {
        List<OnlineUserVo> lst = pushService.queryOnlineUser();
        return AjaxResult.success(lst);
    }

}
